/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufba.lasid.jitclouds.mda.api;

/**
 *
 * @author aliriosa
 */
public interface IVirtualMachineHandler {
    
    public String getID();
    
    /**
     * Create a virtual machine instance
     * @throws Exception 
     */
    public void create() throws Exception;
    
    /**
     * Destroy a virtual machine instance
     * @throws Exception 
     */
    public void destroy() throws Exception;
    
    /**
     * Pause a virtual machine instance
     * @throws Exception 
     */    
    public void pause() throws Exception;
    
    /**
     * Unpause a virtual machine instance
     * @throws Exception 
     */    
    public void unpause() throws Exception;
    
    /**
     * Create a checkpoint of a virtual machine instance (only current memory)
     * @throws Exception 
     */    
    public void checkpoint() throws Exception;
    
    /**
     * Restore a checkpoint of a virtual machine instance (only current memory). 
     * It must keep the instance in pause state.
     * @throws Exception 
     */        
    public void restore() throws Exception;
    
    /**
     * Restore a checkpoint of a virtual machine instance (only current memory). 
     * @throws Exception 
     */            
    public void restoreAndRun() throws Exception;
    
    /**
     * Connect with a virtual machine instance.
     * @throws Exception 
     */            
    public void connect(String vmid) throws Exception;
    
    /**
     * Get the status of a virtual machine instance
     * @return the virtual machine status.
     * @throws Exception 
     */
    public String getStatus() throws Exception;
    
}
